import dt from '@dt/dt'
import ProBuildUnit from '@/biz/option/proBuildUnit.js'

function options(_this, isAudit = false) {
  return [
    ...((new ProBuildUnit()).options(_this, false, false)),
    {
      key: 'commissionOrderStatus',
      title: '房源状态',
      select: {
        options: dt.dictInfo().commissionOrderStatus
      }
    },
    {
      key: 'contractDate',
      title: '签约日期',
      placeholder: '请选择签约日期',
      date: {
        type: 'daterange'
      },
      data: {
        to: (val) => {
          return {
            contractStartDate: val[0],
            contractEndDate: val[1]
          }
        }
      }
    },
    {
      key: 'account',
      title: '回款情况',
      placeholder: '全部',
      select: {
        options: dt.dictInfo().account
      }
    },
    {
      key: 'accountDate',
      title: '入账日期',
      placeholder: '请选择入账日期',
      date: {
        type: 'daterange'
      },
      data: {
        to: (val) => {
          return {
            accountDateStart: val[0],
            accountDateEnd: val[1]
          }
        }
      }
    },
  ]
}

export default {
  options
}